package com.example.order.listener;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.RocketMQTransactionListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Author: songyahui
 * @Date: 2020/10/21 19:32
 * @Version 1.0
 */
@RocketMQMessageListener(topic = "springboot-rocketmq",consumerGroup = "${rocketmq.consumer.group}",messageModel = MessageModel.CLUSTERING)
@Component
public class Consumer01 implements RocketMQListener<String> {
    @Override
    public void onMessage(String s){
        System.out.println("consumer01: 接收消息内容："+s);
    };
}
